//=====================================================================
// Device related include
//=====================================================================
#ifdef WB_LINUX
	#include "linux/wbusb_f.h"
	#include "linux/wb35reg_f.h"
	#include "linux/wb35tx_f.h"
	#include "linux/wb35rx_f.h"
#else
	#include "wbusb_f.h"
	#include "wb35reg_f.h"
	#include "wb35tx_f.h"
	#include "wb35rx_f.h"
#endif

//====================================================================================
// Function declaration
//====================================================================================
VOID hal_remove_mapping_key			( IN phw_data_t pHwData, IN PUCHAR pmac_addr );
VOID hal_remove_default_key			( IN phw_data_t pHwData, IN ULONG index );
BOOLEAN hal_set_mapping_key			( IN phw_data_t Adapter, IN PUCHAR pmac_addr, IN UCHAR null_key, IN UCHAR wep_on, IN PUCHAR ptx_tsc, IN PUCHAR prx_tsc, IN UCHAR key_type, IN UCHAR key_len, IN PUCHAR pkey_data );
BOOLEAN hal_set_default_key			( IN phw_data_t Adapter, IN UCHAR index, IN UCHAR null_key, IN UCHAR wep_on, IN PUCHAR ptx_tsc, IN PUCHAR prx_tsc, IN UCHAR key_type, IN UCHAR key_len, IN PUCHAR pkey_data );
VOID hal_clear_all_default_key		( IN phw_data_t pHwData );
VOID hal_clear_all_group_key		( IN phw_data_t pHwData );
VOID hal_clear_all_mapping_key		( IN phw_data_t pHwData );
VOID hal_clear_all_key				( IN phw_data_t pHwData );
VOID hal_get_ethernet_address		( IN phw_data_t pHwData, IN PUCHAR current_address );
VOID hal_set_ethernet_address		( IN phw_data_t pHwData, IN PUCHAR current_address );
VOID hal_get_permanent_address		( IN phw_data_t pHwData, IN PUCHAR pethernet_address );
BOOLEAN hal_init_hardware			( IN phw_data_t pHwData, IN PADAPTER Adapter );
VOID hal_set_power_save_mode		( IN phw_data_t pHwData, IN BOOLEAN power_save, IN BOOLEAN wakeup, IN BOOLEAN dtim );
VOID hal_get_power_save_mode		( IN phw_data_t pHwData, IN OUT PBOOLEAN pin_pwr_save );
VOID hal_set_slot_time				( IN phw_data_t pHwData, IN UCHAR type );
#define hal_set_atim_window( _A, _ATM )
VOID hal_set_rates					( IN phw_data_t pHwData, IN PUCHAR pbss_rates, IN UCHAR length, IN BOOLEAN basic_rate_set );
#define hal_set_basic_rates( _A, _R, _L ) hal_set_rates( _A, _R, _L, TRUE )
#define hal_set_op_rates( _A, _R, _L ) hal_set_rates( _A, _R, _L, FALSE )
VOID hal_start_bss					( IN phw_data_t pHwData, IN UCHAR mac_op_mode );
VOID hal_join_request				( IN phw_data_t pHwData, IN UCHAR bss_type ); // 0:BSS STA 1:IBSS STA//
VOID hal_stop_sync_bss				( IN phw_data_t pHwData );
VOID hal_resume_sync_bss			( IN phw_data_t pHwData);
VOID hal_set_aid					( IN phw_data_t pHwData, IN USHORT aid );
VOID hal_set_bssid					( IN phw_data_t pHwData, IN PUCHAR pbssid );
VOID hal_get_bssid					( IN phw_data_t pHwData, IN PUCHAR pbssid );
VOID hal_set_beacon_period			( IN phw_data_t pHwData, IN USHORT beacon_period );
VOID hal_set_listen_interval		( IN phw_data_t pHwData, IN USHORT listen_interval );
VOID hal_set_cap_info				( IN phw_data_t pHwData, IN USHORT capability_info );
VOID hal_set_ssid					( IN phw_data_t pHwData, IN PUCHAR pssid, IN UCHAR ssid_len );
VOID hal_set_current_channel		( IN phw_data_t pHwData, IN ChanInfo channel );
VOID hal_set_current_channel_ex		( IN phw_data_t pHwData, IN ChanInfo channel );
VOID hal_get_current_channel		( IN phw_data_t pHwData, OUT ChanInfo *channel );
VOID hal_set_accept_broadcast		( IN phw_data_t pHwData, IN UCHAR enable );
VOID hal_set_accept_multicast		( IN phw_data_t pHwData, IN UCHAR enable );
VOID hal_set_accept_beacon			( IN phw_data_t pHwData, IN UCHAR enable );
VOID hal_set_multicast_address		( IN phw_data_t pHwData, IN PUCHAR address, IN UCHAR number );
UCHAR hal_get_accept_beacon			( IN phw_data_t pHwData );
VOID hal_stop						( IN phw_data_t pHwData );
VOID hal_halt						( IN phw_data_t pHwData, void *ppa_data );
VOID hal_start_tx0					( IN phw_data_t pHwData );
VOID hal_set_phy_type				( IN phw_data_t pHwData, IN UCHAR PhyType );
VOID hal_get_phy_type				( IN phw_data_t pHwData, IN UCHAR *PhyType );
BOOLEAN hal_reset_hardware			( IN phw_data_t pHwData, IN PVOID ppa );
VOID hal_set_cwmin					( IN phw_data_t pHwData, IN UCHAR	cwin_min );
#define hal_get_cwmin( _A )			( (_A)->cwmin )
VOID hal_set_cwmax					( IN phw_data_t pHwData, IN USHORT cwin_max );
#define hal_get_cwmax( _A )			( (_A)->cwmax )
void hal_set_rsn_wpa				( IN phw_data_t pHwData, IN ULONG * RSN_IE_Bitmap ,IN ULONG * RSN_OUI_type ,IN unsigned char bDesiredAuthMode);
//LONG hal_get_rssi( IN phw_data_t pHwData, IN ULONG HalRssi );
LONG hal_get_rssi					( IN phw_data_t pHwData, IN ULONG *HalRssiArry, IN u8 Count );
LONG hal_get_rssi_bss( IN phw_data_t pHwData, IN USHORT idx, IN u8 Count );
VOID hal_set_connect_info			( IN phw_data_t pHwData, IN BOOLEAN boConnect );
UCHAR hal_get_est_sq3				( IN phw_data_t pHwData, IN UCHAR Count );
VOID hal_led_control_1a				( IN phw_data_t pHwData );
VOID hal_led_control				( IN PVOID S1, IN phw_data_t pHwData, IN PVOID S3, IN PVOID S4 );
VOID hal_set_rf_power				( IN phw_data_t pHwData, IN UCHAR PowerIndex ); // 20060621 Modify
VOID hal_reset_counter				( IN phw_data_t pHwData );
VOID hal_set_radio_mode				( IN phw_data_t pHwData, IN BOOLEAN boValue);
VOID hal_descriptor_indicate		( IN phw_data_t pHwData, IN PDESCRIPTOR pDes );
u8 hal_get_antenna_number			( IN phw_data_t pHwData );
VOID hal_set_antenna_number			( IN phw_data_t pHwData, u8 number );
ULONG hal_get_bss_pk_cnt				( IN phw_data_t pHwData );
#define hal_get_region_from_EEPROM( _A ) ( (_A)->Wb35Reg.EEPROMRegion )
VOID hal_set_accept_promiscuous		( IN phw_data_t pHwData, IN UCHAR enable);
#define hal_get_tx_buffer( _A, _B ) Wb35Tx_get_tx_buffer( _A, _B )
UCHAR hal_get_hw_radio_off			( IN phw_data_t pHwData );
#define hal_software_set( _A )		(_A->SoftwareSet)
#define hal_driver_init_OK( _A )	(_A->IsInitOK)
#define hal_rssi_boundary_high( _A ) (_A->RSSI_high)
#define hal_rssi_boundary_low( _A ) (_A->RSSI_low)
#define hal_scan_interval( _A )		(_A->Scan_Interval)
VOID hal_scan_status_indicate		( IN phw_data_t pHwData, UCHAR status);	// 0: complete, 1: in progress
VOID hal_system_power_change		( IN phw_data_t pHwData, ULONG PowerState ); // 20051230 -=D0 1=D1 ..
VOID hal_surprise_remove			( IN phw_data_t pHwData );

#define PHY_DEBUG( msg, args... )  


  
VOID hal_rate_change( IN phw_data_t pHwData ); // Notify the HAL rate is changing 20060613.1
BOOL hal_get_dxx_reg( IN phw_data_t pHwData, IN USHORT number, OUT PULONG pValue );
BOOL hal_set_dxx_reg( IN phw_data_t pHwData, IN USHORT number, IN ULONG value );
#define hal_get_time_count( _P )	(_P->time_count/10)	// return 100ms count
#define hal_detect_error( _P )		(_P->WbUsb.DetectCount)
BOOL hal_set_LED( IN phw_data_t pHwData, IN ULONG Mode ); // 20061108 for WPS led control

//-------------------------------------------------------------------------
// The follow function is unused for IS89C35
//-------------------------------------------------------------------------
//#define hal_reset_counter(_A)
#define hal_disable_interrupt(_A)
#define hal_enable_interrupt(_A)
#define hal_get_interrupt_type( _A)
#define hal_get_clear_interrupt(_A)
#define hal_ibss_disconnect(_A) hal_stop_sync_bss(_A)
#define hal_join_request_stop(_A)
BOOLEAN	hal_idle( IN phw_data_t pHwData );
#define pa_stall_execution( _A )	//OS_SLEEP( 1 )
#define hw_get_cxx_reg( _A, _B, _C )
#define hw_set_cxx_reg( _A, _B, _C )
#define hw_get_dxx_reg( _A, _B, _C )	hal_get_dxx_reg( _A, _B, (PULONG)_C )
#define hw_set_dxx_reg( _A, _B, _C )	hal_set_dxx_reg( _A, _B, (ULONG)_C )


